19. March 2018 at 18:29 #14432
Hello again, ive tried for the past few days to make a system like in the userprefs whit enum buttons that redraw the area, so far ive been successful in making it but im stuck, i make it for the properties panel which i modified but i cant use mainb, mainbo nor mainbuser and preview updates everything, so ive tried to write my own bitflag but i cant seem to be able and the error messages dont say anything helpful. Does someone over here has a clue how to make a independent flag for lets say redraw the data tab only but isnt influenced if the user clicks on other tabs (with preview and mainb it has the funny but annoying custom to switch according to what was opened last, Render = 1. enum, Renderlayers 2. enum, etc even if its in the data tab) ?
i really dont know where else i could ask, blender irc chats (i tried most of them) are ignorant, blender stackexchange is python only and blenderartists are trolls. neither do i find any educational manuals, the best one ive seen is also from BforArtists so thank you very much if anyone can help me, this is the only place i know where i can ask without getting angry comments…19. March 2018 at 20:06 #19425
This would only work with a C prop. The usual Python methods are global. There is simply no way to make a Python flag local. Sorry that i have no better news here.19. March 2018 at 20:57 #19427
i know, thats why i asked. i did a C prop and it works but not with mainb, i would have to make a new bitflag in the source file but when i try to make one then i get plenty errors but no error to pinpoint the problem. So my question would be how to make a bitflag that can redraw the area only locally in data only without affecting the other mainb tabs. So basically i need to know how to add a new SDNA
when i add to in the DNA_space_types to the location where for example mainb, mainbo, mainbuser and stuff like preview is a new flag then all i get are hundred errors but no help. but for example in dna_userdef_types there is a flag called userpref which i cant find in the editor files nor anywhere else and it still works
till now i just fixed that problem with using “flag” as sdna but i dont know if that would cause any trouble, if not then i wont mind but im not sure.20. March 2018 at 7:31 #19432
I see. I am of no big help with that, unfortunately. I am also in big trouble when i need to do this. I avoid to touch the C part where ever possible. It’s a inhomogenous mostly uncommented mess. The same thing gets done in a dozen different ways. And you can never be sure if you don’t run into a conflict here.
The few C code flags that i have implemented were added to places that already exists. You could grep an existing flag, and follow how it is implemented. Then try to repeat the method. In the end everything working is allowed20. March 2018 at 16:15 #19438
Youre more of a help than you think, youre also the first who doesnt sugarcoat the uncommented mess which they call themselves chaos at some points on the Blender Wiki. Glad that its not just me who has sometimes trouble with it im looking forward for Blender 2.8, i hope they really do cleanup their Code as they promised!23. March 2018 at 17:55 #19451
by the way, could you provide some of these sdna flags i could track down which could help the most?23. March 2018 at 20:02 #19452
I’m sorry, i cannot. It all depends of the editor where you want to use it in. Some stuff just works in the Properties editor, some stuff just works in the User Preferences …24. March 2018 at 6:59 #19453
As a little example, here’s the original patch from Julian Eisel to hide the 3D cursor, which gots declined in those days https://developer.blender.org/D1110
This functionality now made it after many years into newest Blender version. It’s now in the User Preferences. And is different implemented. You could grep this one to its roots.
- You must be logged in to reply to this topic.