Primitive objects - Solution
Same proposal posted before Here and Here sorry for repeating but this one has additional detail and kind of solution and future sight of it.
As I know Blender developers try to keep the Blender light and make it accessible to all, even for older PCs. Adding codes of individual objects inside of blender makes alot of problems such as longer compiling time and bigger size... .
But if it coded out and build externaly, problems will solves, How? let me explain.
Each object coded in a class and compile as dynamic link library file.
Class BlenderIndividualPrimitivesobjectClass
{...
Put compiled files in a specified directory in blender. .//IndividualClasses//..
Each class has own Identification
{
Class = "Mesh"; /* or "Curve" , "Surface", "Armature" ... */
Category = "Standard Primitives";
Name = "Sphere" /* Subclass */
Version = "v1.0.0";
Blender_Version = "v2.81" ...
Blender can take list of needed arguments and script for create a simple UI
string GetUI()
{...
UI for request parameters from users.
layout.label(text="Sphere")...
layout.row.prop("Radius")...
layout.row.prop("Segments")...
Put all argument in an array and sent them to other function
bool Create([Array of Parameters])
{
VertData
FaceData
UVData ...
Store calculation result on reachable arrays for blender any time without recalculation
class ......
{
public VertData
public FaceData
public UVData
...
Blender read the data and put it in a linked Object Data with same class.
This is the basic idea but in deeper look, some more things may need at the go.
This function calls right after object create and updated inside of blender. it can create a Python script and let to do some more action.
PostCreate()
{...
e.g. if eyeball object class create, this script can create a shader and assign on it.
This functions calls before and after render start and can update data in Render or in View port mode
PreRender()
PostRender()
e.g. Hi poly tree for render and a simple low poly one for view port
This function Calls on Time change
Update()
{...
e.g. some thing like a windy tree or ocean waves needed to update each frame
and some more to having more control on object behavior
PreSave()
PostSave()
PostLoad()
Just put a template C++ file and let the users made own objects there and share and categorize for them self
Advantage :
Working on a single class is much more easy way than the work on the whole blender codes and this make more people involving themselves in coding. Many ideas will come from peoples and they will enjoy to make the own primitives and share it. Each artist can made his\her own library.
This can be a solution of the other proposals to.
"Sweep modifier prebuilt shapes" A primitive sweep shape can solve this.
"Infinite Floor Plane" A plane whit scale on render option.
5 Comments
For now I made BsMax add-on that contain primitive objects too.
Dowinload link and more information is here: nevilart.blogspot.com/2019/02/bsmax.html
I approve non destructive primitives. I think it's a must. I am an architect, and this would help greatly. I can already imagine plugins for non destructive primitives of furniture, doors, windows... Great stuff.
It's a must for Blender...
I understand the concept, if not the code. Thank you for sharing this, I hope the developers consider applying you ideas.
@dcb.creative: Yes, this is just a Concept I tried to explain.