Jump to content

User:Paradox-01/Blender/Research: Difference between revisions

m
no edit summary
m (Iritscen moved page User:Paradox-01/Blender Research to User:Paradox-01/Blender/Research without leaving a redirect: author request)
mNo edit summary
Line 2: Line 2:
  C:\Program Files\Blender Foundation
  C:\Program Files\Blender Foundation
where each bigger version gets its own folder
where each bigger version gets its own folder
...
  Blender 3.1
  Blender 3.1
  Blender 2.93
  Blender 2.93
  Blender 2.83
  Blender 2.83
...


==Blender horror reloaded==
<span style="font-size: 32pt;">'''Blender horror reloaded'''</span>
===Random session #1===
 
====Script log====
==Random session #1==
===Script log===
Almost all actions in Blender get logged. You need to '''open the "info" window''' to see it.
Almost all actions in Blender get logged. You need to '''open the "info" window''' to see it.
  bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
  bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))


====Python console====
===Python console===
Logged commands can be copied into the python console. Press enter key to execute.
Logged commands can be copied into the python console. Press enter key to execute.


Line 23: Line 24:
You can translate file paths you get from Explorer's address bar by turning "\" into "\\".  
You can translate file paths you get from Explorer's address bar by turning "\" into "\\".  


====Text editor window====
===Text editor window===
You can collected logged commands in a python file if you use the text editor.
You can collected logged commands in a python file if you use the text editor.


Line 42: Line 43:
  bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
  bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))


====No drag and drop support====
===No drag and drop support===
Unbelievable, but after all these years drag and drop support is almost zero.
Unbelievable, but after all these years drag and drop support is almost zero.


Line 114: Line 115:
  # https://blender.stackexchange.com/questions/44382/blender-python-select-an-object-with-the-sequence-of-letters-in-a-name
  # https://blender.stackexchange.com/questions/44382/blender-python-select-an-object-with-the-sequence-of-letters-in-a-name


====Outliner====
===Outliner===
When click the second icon (Display Mode) of the Outliner you can change the Layer View to Data API. This might be helpful for logging one or another command by toying around in properties.
When click the second icon (Display Mode) of the Outliner you can change the Layer View to Data API. This might be helpful for logging one or another command by toying around in properties.


===Random session #2===
==Random session #2==
====More Python====
===More Python===
Remember to ... Edit > Preferences
Remember to ... Edit > Preferences


Line 124: Line 125:




====Python-generated UI====
===Python-generated UI===


Reading for later:
Reading for later:
Line 138: Line 139:
[...]
[...]


===Random session #3===
==Random session #3==
====Dynamic context menus====
===Dynamic context menus===
The idea is to give [[XML:File_types#BINA.2FOBJC|function objects (CJBO)]] a dynamic context menu, either by analyzing its given collection name and/or further tags/properties given to the object.
The idea is to give [[XML:File_types#BINA.2FOBJC|function objects (CJBO)]] a dynamic context menu, either by analyzing its given collection name and/or further tags/properties given to the object.


Line 149: Line 150:
[...]
[...]


===Build Blender===
==Build Blender==
  https://wiki.blender.org/wiki/Building_Blender
  https://wiki.blender.org/wiki/Building_Blender
  https://wiki.blender.org/wiki/Building_Blender/Windows
  https://wiki.blender.org/wiki/Building_Blender/Windows
Line 162: Line 163:
  make
  make


===Build Blender with Visual Studio===
==Build Blender with Visual Studio==
  cd C:\blender-git\blender
  cd C:\blender-git\blender
  make full nobuild
  make full nobuild


In solution explorer open "CMakePredefinedTargets", right-click "INSTALL", click "build" ("Erstellen" in German).
In solution explorer open "CMakePredefinedTargets", right-click "INSTALL", click "build" ("Erstellen" in German).
==Proof of concept==
Unorthodox but could be effective.
Blender, drag'n'drop event of an oni file ->
context aware conversion manager.exe ->
OniSplit.exe ->
Blender continues to run, converted files get read by python scripts, these are chosen based on what four letter file prefix the oni file had
For example this would greatly automate level modding.
Objects would be tagged and placed on suitable layers. (CJBO management.)
This could replace the outdated XSI workflow and its addon.


===wm_window.c ===
===wm_window.c ===
Line 232: Line 247:
  }
  }


====Todo====
===Todo===
1) replace notepad with own exe (writing more code in C is a pain)
1) replace notepad with own exe (writing more code in C is a pain)


Line 244: Line 259:


::: '''That would mean we either have to bite the sour apple and write much more C <s>or do less with a workaround</s>.'''
::: '''That would mean we either have to bite the sour apple and write much more C <s>or do less with a workaround</s>.'''
::: <s>Possibilities:</s>
 
::: <s>1) Blender Server, '''[https://blender.stackexchange.com/questions/41533/how-to-remotely-run-a-python-script-in-an-existing-blender-instance sockets]'''.</s>
4) Deciding how to distribute this Blender variant.
::: <s>2) Add a '''new start arg''' and let Blender run as '''[https://www.youtube.com/watch?v=_i9HkIT0Atg single-instance application]'''</s>
 
Long-term goals could be to include Delano's addon and provide a way to automate the updating of Blender with these extras.
 
==Notes for further customizations==
* Catching getActive Events would be interesting.
* '''[https://blender.stackexchange.com/questions/41533/how-to-remotely-run-a-python-script-in-an-existing-blender-instance Blender Server]'''
* Globals are located in
BKE_global.h
 
The files close to main would need to be edited if Blender shall became a [https://www.youtube.com/watch?v=_i9HkIT0Atg single-instance application]. If started with hypothetical "singleInstance" arg, that would allow a permanent ''command line communication''.
  C:\blender-git\blender\source\creator
  C:\blender-git\blender\source\creator


Line 252: Line 276:
  creator.c
  creator.c
  creator_args.c
  creator_args.c
::: <s>3) A '''timer''' that checks every second for '''[https://github.com/zeffii/bpy_externall new commands inside a file]'''.</s>
4) Deciding how to distribute this Blender variant.


Long-term goals could be to include Delano's addon and provide a way to automate the updating of Blender with these extras.
* Pipe communication.
8,452

edits